package com.dagene.weixin.util;

import java.util.Map;

public interface Constants {
	Map<String, String> map = FileUtil.getWeiXinProp();

	static String weixinurl = map.get("WEIXINURL");
	static String NowweixinUrl = weixinurl;
	static String APPID = map.get("APPID");
	static String APPSECRET = map.get("APPSECRET");

	// 公众号收到消息
	static int SERVICE_RECEIVED_MSG = 2001;
	// 客服发送消息
	static int KEFU_SEND_MSG = 2002;
	// 客服收到消息
	static int KEFU_RECEIVED_MSG = 2003;
	// 转接会话
	static int KEFU_TRANSFER_MSG = 1003;
	// 请求接入状态
	static int REQUEST_ACCESS_STATE = 1000;
	// 接入成功状态
	static int ACCESS_SUCCESS_STATE = 1001;
	// 客服关闭会话
	static int KEFU_CLOSE_MSG = 1004;
	// 超时关闭会话
	static int OUTTIME_CLOSE_MSG = 1005;

	// 重复接入时提醒
	static String IN_ACCESS_STATE = "正在为您接入客服，请等待！";

	// 关闭接入
	static String OUT_ACCESS_STATE = "会话已关闭，请重新请求接入客服！";

	// 一分钟
	// static final long ONE_MINUTE = 60000L;

	// 接入会话最大时常 一小时
	static final long ACCESS_MAX_LIMIT_TIME = 3600000L;
	
	static final long ACCESS_TWO_DAY_TIME = 3600000*48L;

	// 未获取到用户openid
	static String OPENID_IS_NULL = "未获取到用户信息，请返回公众号重新进入！";

	// 成功
	public static int SUCCESS_CODE = 0;
	// 未检索到记录
	public static int RECORD_NO_EXIST_CODE = 1;
	// session中用户为空
	public static int SESSION_TIMEOUT = -1;
	
	// session中用户为空
	public static int NOT_REGISTER = 90;
	
	// 客户聊天超时
	public static int CHAT_TIMEOUT = -2;
	
	// 客户正在聊天
	public static int CHAT_ING = -3;
	
	// 客户被其他客服强行接走
	public static int CHAT_CHANGE = -4;
	
	public static int FIELD_LENGTH_OUT = 2;
	// 登录密码错误
	public static int PWD_ERROR_CODE = 3;
	
	// 未在微信端打开
	public static int NO_IN_WEIXIN = 4;
			
	// 失败
	public static int ERROR_CODE = 99;

	// 用户没有绑定医院
	public static int NO_HOSPITAL_REGISTER = 44;
	// 资格认证未成功
	public static int NO_CERTIFICATION = 45;


	// 没有抽奖次数
	public static int NO_LOTTERY = 10;
	// 已经中奖
	public static int ALREADY_WINNING = 11;

	// APP和网页支付提交用户端ip
	public final static String SPBILL_CREATE_IP = "183.129.151.130";
	
	public static int FAIL_WEIXIN_ORDER = 30;

	/**
	 * 微信支付接口地址
	 */
	// 统一下单接口(POST)
	public final static String UNIFIED_ORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";
	// 查询订单接口(POST)
	public final static String CHECK_ORDER_URL = "https://api.mch.weixin.qq.com/pay/orderquery";
	// 关闭订单接口(POST)
	public final static String CLOSE_ORDER_URL = "https://api.mch.weixin.qq.com/pay/closeorder";
	// 申请退款接口(POST)
	public final static String REFUND_URL = "https://api.mch.weixin.qq.com/secapi/pay/refund";
	// 查询退款接口(POST)
	public final static String CHECK_REFUND_URL = "https://api.mch.weixin.qq.com/pay/refundquery";
	// 下载对账单接口(POST)
	public final static String DOWNLOAD_BILL_URL = "https://api.mch.weixin.qq.com/pay/downloadbill";
	// 测速上报接口(POST)
	public final static String REPORT_URL = "https://api.mch.weixin.qq.com/payitil/report";
}
